//
//  TitleView.swift
//  WBDemo
//
//  Created by Meng on 17/2/27.
//  Copyright © 2017年 demo. All rights reserved.
//

import UIKit
import SnapKit

class TitleView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private func setupUI() {
        let lb = UILabel()
        lb.text = "发微博"
        addSubview(lb)
        lb.snp.makeConstraints { (make) in
            make.centerX.equalTo(self)
            make.top.equalTo(self).offset(8)
        }
        let sublb = UILabel()
        sublb.text = UserAccount.readUserAccount()?.screen_name
        sublb.font = UIFont.systemFont(ofSize: 12)
        sublb.textColor = UIColor.lightGray
        addSubview(sublb)
        sublb.snp.makeConstraints { (make) in
            make.centerX.equalTo(self)
            make.top.equalTo(lb.snp.bottom)
        }
    }

}
